/**     
 * @Title: TopicConsumer.java   
 * @Package me.mq.exchange.consumer   
 * @Description: TODO
 * @author weiwei 
 * @date 2018年5月30日 上午10:53:13   
 * @version V1.0     
 */
package me.mq.exchange.consumer;

import me.mq.exchange.config.RabbitMQConfigWithTopicExchange;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

import cn.hutool.core.lang.Console;

/**
 * @ClassName: TopicConsumer
 * @Description: TODO
 * @author weiwei
 * @date 2018年5月30日 上午10:53:13
 * 
 */
@Profile("topic")
@Component
public class TopicConsumer {

	@RabbitListener(queues = RabbitMQConfigWithTopicExchange.QUEUE_NAME_APPLE)
	public void consumeMessage1(String message) {
		Console.log("apple consume message {}", message);
	}

	@RabbitListener(queues = RabbitMQConfigWithTopicExchange.QUEUE_NAME_BANANA)
	public void consumeMessage2(String message) {
		Console.log("banana consume message {}", message);
	}

	@RabbitListener(queues = RabbitMQConfigWithTopicExchange.QUEUE_NAME_ORANGE)
	public void consumeMessage3(String message) {
		Console.log("orange consume message {}", message);
	}
}
